An operating system allocates pages of physical memory to user memory and kernel memory. Within the physical memory, user pages allocated to user memory may be adjacent to kernel pages allocated to kernel memory. Specifically, user pages are physical pages of the physical memory mapped to an address range in a user address space. Kernel pages are physical pages of the physical memory mapped to an address range in a kernel address space.
When the operating system requires contiguous pages of the physical memory, the operating system attempts to create the contiguous pages by relocating pages. For example, if the contiguous pages of physical memory are user pages and kernel pages, then the operating system may attempt to relocate data in the user pages to other user pages located elsewhere in the physical memory. Similarly, the operating may attempt to relocate data in the kernel pages to other kernel pages located elsewhere in the physical memory. The relocation thus creates pages of the contiguous pages that are available for use.
However, the kernel pages are not easily relocated. For example, to relocate a kernel page, processes accessing the kernel page are blocked. Thus, processes accessing the kernel page wait until the data in the kernel pages is relocated and new mappings to a new kernel page are provided to the waiting processes. Although relocating a user page undergoes a similar blocking operation, the processes waiting to access the user page are not kernel-related processes. Typically, kernel-related processes that are blocked reduce the overall performance of the operating system. Accordingly, kernel pages are not relocated unless hardware related to the physical memory the kernel pages reside are replaced.
Instead of relocating pages, another technique to create contiguous pages of physical memory is to shutdown and startup the operating system and computer. During the shutdown, any user applications are gracefully stopped in order to prevent data loss or corruption. In some larger systems, gracefully stopping a user application, such as a database, may require a half an hour in addition to the time required to shutdown the operating system. Then, during the startup of the computer, the operating system and the user applications require time before full access to the user applications is permitted. This startup time may also take a half-hour or more. Thus, if the technique used to create contiguous pages of physical memory is to shutdown and startup the computer, then the entire process for these larger systems may last an hour or more. The downtime of the computer between the initiation of the shutdown and the end of the startup may be unacceptable.